var mongoose = require('mongoose'),
    Configuration = mongoose.model('Configuration');
exports.getConfiguration = function(req, res) {
  Configuration.findOne({ _id: req.query.configurationId })
  .exec(function(err, configuration) {
    if (!configuration){
      res.json(404, {msg: 'Configuration Not Found.'});
    } else {
      res.json(configuration);
    }
  });
};
exports.getConfigurations = function(req, res) {
  Configuration.find()
  .exec(function(err, configurations) {
    if (!configurations){
      res.json(404, {msg: 'Configurations Not Found.'});
    } else {
      res.json(configurations);
    }
  });
};